
		**********************************************************
		** File: 1_unodc_EBA_results.do							**
		** Paper: Human Trafficking Indicators: A New Dataset	**
		** Author: Richard Frank								**
		** Date: July 27, 2021									**
		** Task: Summarizing UNODC dest. results by IV		**
 		**********************************************************
 
	clear
	version 16.1
	set seed 1234
	cd  "~"
 
	********************** 
	** 1 agr_employment **
	**********************	
						
	use "eba_unodc_1.dta", clear
	gen x="dest_UNODC:agrave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 
	********************* 
	** 2 Latin America **
	*********************	
						
	use "eba_unodc_2.dta", clear
	gen x="dest_UNODC:america_l"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	** 3 N America **
	*****************	
						
	use "eba_unodc_3.dta", clear
	gen x="dest_UNODC:america_n"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	******************** 
	** 4 conflict_ext **
	********************	
						
	use "eba_unodc_4.dta", clear
	gen x="dest_UNODC:conflict_extave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	******************** 
	** 5 conflict_int **
	********************	
						
	use "eba_unodc_5.dta", clear
	gen x="dest_UNODC:conflict_intave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	******************** 
	** 6 conflict_int **
	********************	
						
	use "eba_unodc_6.dta", clear
	gen x="dest_UNODC:cpiave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************** 
	** 7 E Asia **
	**************	
						
	use "eba_unodc_7.dta", clear
	gen x="dest_UNODC:easia_pacific"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	** 8 Energy use**
	*****************	
						
	use "eba_unodc_8.dta", clear
	gen x="dest_UNODC:energyuseave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*********************** 
	**  9 Ethnic tension **
	***********************	
						
	use "eba_unodc_9.dta", clear
	gen x="dest_UNODC:ethnic_tensionave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	**************** 
	**  10 Ethnic **
	****************	
						
	use "eba_unodc_10.dta", clear
	gen x="dest_UNODC:ethnicave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  11 Europe *
	***************	
						
	use "eba_unodc_11.dta", clear
	gen x="dest_UNODC:europe"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 			
	***************** 
	**  12 execleft *
	*****************	
						
	use "eba_unodc_12.dta", clear
	gen x="dest_UNODC:execleftave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  13 execright *
	***************	
						
	use "eba_unodc_13.dta", clear
	gen x="dest_UNODC:execrightave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************ 
	**  14 FDI *
	************	
						
	use "eba_unodc_14.dta", clear
	gen x="dest_UNODC:fdiave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	**  15 food_bev *
	*****************	
						
	use "eba_unodc_15.dta", clear
	gen x="dest_UNODC:foodave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	**  16 homicide *
	*****************	
						
	use "eba_unodc_16.dta", clear
	gen x="dest_UNODC:homicidesave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  17 infant *
	***************	
						
	use "eba_unodc_17.dta", clear
	gen x="dest_UNODC:infantave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*************** 
	**  18 KOFSoG *
	***************	
						
	use "eba_unodc_18.dta", clear
	gen x="dest_UNODC:KOFSoGIave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	***************** 
	**  19 Language *
	*****************	
						
	use "eba_unodc_19.dta", clear
	gen x="dest_UNODC:languageave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	********************** 
	**  20 legal british *
	**********************	
						
	use "eba_unodc_20.dta", clear
	gen x="dest_UNODC:legal_britishave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	********************* 
	**  21 legal french *
	*********************	
						
	use "eba_unodc_21.dta", clear
	gen x="dest_UNODC:legal_frenchave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	********************* 
	**  22 legal german *
	*********************	
						
	use "eba_unodc_22.dta", clear
	gen x="dest_UNODC:legal_germanave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
	******************* 
	**  23 legal scan *
	*******************	
						
	use "eba_unodc_23.dta", clear
	gen x="dest_UNODC:legal_scanave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
		
 	***************** 
	**  24 Literacy *
	*****************	
						
	use "eba_unodc_24.dta", clear
	gen x="dest_UNODC:literacyave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	******************* 
	**  25 lp_catho80 *
	*******************	
						
	use "eba_unodc_25.dta", clear
	gen x="dest_UNODC:lp_catho80ave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	********************* 
	**  26  lp_protmg80 *
	*********************	
						
	use "eba_unodc_26.dta", clear
	gen x="dest_UNODC:lp_protmg80ave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 																				
 	************** 
	**  27 media *
	**************	
						
	use "eba_unodc_27.dta", clear
	gen x="dest_UNODC:mediaave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	************* 
	**  28 mena *
	*************	
						
	use "eba_unodc_28.dta", clear
	gen x="dest_UNODC:mena"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 																					
 	****************** 
	**  29 migration *
	******************	
						
	use "eba_unodc_29.dta", clear
	gen x="dest_UNODC:migrationave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 											
 	************************** 
	**  30  mortality_under5 *
	**************************	
						
	use "eba_unodc_30.dta", clear
	gen x="dest_UNODC:mortality5ave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
				
	****************** 
	** 31 muslimave **
	******************	
						
	use "eba_unodc_31.dta", clear
	gen x="dest_UNODC:muslimave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************* 
	** 32 OECD **
	*************	
						
	use "eba_unodc_32.dta", clear
	gen x="dest_UNODC:oecd"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	************************ 
	** 33 peacekeepersfl  **
	************************	
						
	use "eba_unodc_33.dta", clear
	gen x="dest_UNODC:peacekeepersflave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
 	************************ 
	** 34 peacekeeperssl  **
	************************	
						
	use "eba_unodc_34.dta", clear
	gen x="dest_UNODC:peacekeeperslave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
 	**************** 
	** 35 Polity  **
	****************	
						
	use "eba_unodc_35.dta", clear
	gen x="dest_UNODC:polity2ave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
  	************* 
	** 36 Pop  **
	*************	
						
	use "eba_unodc_36.dta", clear
	gen x="dest_UNODC:popave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
  	********************** 
	** 37 prevention_3p **
	**********************	
						
	use "eba_unodc_37.dta", clear
	gen x="dest_UNODC:preventave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
  	************************ 
	** 38 prostitutionlaw **
	************************	
						
	use "eba_unodc_38.dta", clear
	gen x="dest_UNODC:prostlawave"
	** 1.1. regressions calculated
		codebook _id
	** 1.2. beta mean & se  **
		sum coef if var==x
 	** 1.3.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.4 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */

	***************** 
	**  39 protect **
	*****************	
						
	use "eba_unodc_39.dta", clear
	gen x="dest_UNODC:protectave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 	
	************* 
	**  40 PVE **
	*************	
						
	use "eba_unodc_40.dta", clear
	gen x="dest_UNODC:pveave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	********************* 
	**  41 refugees_dl **
	*********************	
						
	use "eba_unodc_41.dta", clear
	gen x="dest_UNODC:refugeesave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	****************** 
	**  42 religion **
	******************	
						
	use "eba_unodc_42.dta", clear
	gen x="dest_UNODC:religionave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	************** 
	**  43  RLE **
	**************	
						
	use "eba_unodc_43.dta", clear
	gen x="dest_UNODC:rleave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*************** 
	**  44 SASIA **
	***************
						
	use "eba_unodc_44.dta", clear
	gen x="dest_UNODC:sasia"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	************* 
	**  45 SSA **
	*************
						
	use "eba_unodc_45.dta", clear
	gen x="dest_UNODC:ssa"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	***************** 
	**  46 tourism **
	*****************
						
	use "eba_unodc_46.dta", clear
	gen x="dest_UNODC:tourismave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*************** 
	**  47 trade **
	***************
						
	use "eba_unodc_47.dta", clear
	gen x="dest_UNODC:tradeave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	********************** 
	**  48 unemployment **
	**********************	
						
	use "eba_unodc_48.dta", clear
	gen x="dest_UNODC:unemploymentave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	****************** 
	**  49 urbanpop **
	******************	
						
	use "eba_unodc_49.dta", clear
	gen x="dest_UNODC:urbanave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	*************
	**  50 vae **
	*************	
						
	use "eba_unodc_50.dta", clear
	gen x="dest_UNODC:vaeave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	******************* 
	**  51 visa_dest **
	*******************	
						
	use "eba_unodc_51.dta", clear
	gen x="dest_UNODC:visaave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	***************
	**  52 wecon **
	***************
						
	use "eba_unodc_52.dta", clear
	gen x="dest_UNODC:weconave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 
 	***************
	**  53 wesoc **
	***************
						
	use "eba_unodc_53.dta", clear
	gen x="dest_UNODC:wosocave"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
	*****************
	**  54 english **
	*****************
						
	use "eba_unodc_54.dta", clear
	gen x="dest_UNODC:english"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	**************** 
	**  55 french **
	****************	
						
	use "eba_unodc_55.dta", clear
	gen x="dest_UNODC:french"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	**************** 
	**  56 german **
	****************	
						
	use "eba_unodc_56.dta", clear
	gen x="dest_UNODC:german"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 				
	***************** 
	**  57 spanish **
	*****************	
						
	use "eba_unodc_57.dta", clear
	gen x="dest_UNODC:spanish"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 															
	******************** 
	**  58 portuguese **
	********************	
						
	use "eba_unodc_58.dta", clear
	gen x="dest_UNODC:portuguese"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 															
	******************** 
	**  59 landlocked **
	********************	
						
	use "eba_unodc_59.dta", clear
	gen x="dest_UNODC:landlocked"
	** 1.1. regressions calculated
		codebook _id
	** 1.3. beta mean & se   **
		sum coef if var==x
 	** 1.4.  %(significant != 0)  **
 		count if var==x & pval<=.05 & pval~=.
	** 1.5 CDF **	
		sort coef
		cumul coef if var==x, gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 															
 
		
	*********** 
	** 0 GDP **
	***********		
		
		
	local var "dest_UNODC:gdpave"
		
		
		** 1 **
		use	eba_unodc_1.dta, clear
		keep if var=="`var'"
		save `var'1.dta, replace
 
 		** 2 **
		use	eba_unodc_2.dta, clear
		keep if var=="`var'"
		save `var'2.dta, replace
 
 		** 3 **
		use	eba_unodc_3.dta, clear
		keep if var=="`var'"
		save `var'3.dta, replace
 
 		** 4 **
		use	eba_unodc_4.dta, clear
		keep if var=="`var'"
		save `var'4.dta, replace
 
 		** 5 **
		use	eba_unodc_5.dta, clear
		keep if var=="`var'"
		save `var'5.dta, replace
 
 		** 6 **
		use	eba_unodc_6.dta, clear
		keep if var=="`var'"
		save `var'6.dta, replace
 
 		** 7 **
		use	eba_unodc_7.dta, clear
		keep if var=="`var'"
		save `var'7.dta, replace
 
 		** 8 **
		use	eba_unodc_8.dta, clear
		keep if var=="`var'"
		save `var'8.dta, replace
 
 		** 9 **
		use	eba_unodc_9.dta, clear
		keep if var=="`var'"
		save `var'9.dta, replace
 
 		** 10 **
		use	eba_unodc_10.dta, clear
		keep if var=="`var'"
		save `var'10.dta, replace

		** 11 **
		use	eba_unodc_11.dta, clear
		keep if var=="`var'"
		save `var'11.dta, replace
 
 		** 12 **
		use	eba_unodc_12.dta, clear
		keep if var=="`var'"
		save `var'12.dta, replace
 
 		** 13 **
		use	eba_unodc_13.dta, clear
		keep if var=="`var'"
		save `var'13.dta, replace
 
 		** 14 **
		use	eba_unodc_14.dta, clear
		keep if var=="`var'"
		save `var'14.dta, replace
 
 		** 15 **
		use	eba_unodc_15.dta, clear
		keep if var=="`var'"
		save `var'15.dta, replace
 
 		** 16 **
		use	eba_unodc_16.dta, clear
		keep if var=="`var'"
		save `var'16.dta, replace
 
 		** 17 **
		use	eba_unodc_17.dta, clear
		keep if var=="`var'"
		save `var'17.dta, replace
 
 		** 18 **
		use	eba_unodc_18.dta, clear
		keep if var=="`var'"
		save `var'18.dta, replace
 
 		** 19 **
		use	eba_unodc_19.dta, clear
		keep if var=="`var'"
		save `var'19.dta, replace
 
 		** 20 **
		use	eba_unodc_20.dta, clear
		keep if var=="`var'"
		save `var'20.dta, replace		
		
		** 21 **
		use	eba_unodc_21.dta, clear
		keep if var=="`var'"
		save `var'21.dta, replace
 
 		** 22 **
		use	eba_unodc_22.dta, clear
		keep if var=="`var'"
		save `var'22.dta, replace
 
 		** 23 **
		use	eba_unodc_23.dta, clear
		keep if var=="`var'"
		save `var'23.dta, replace
 
 		** 24 **
		use	eba_unodc_24.dta, clear
		keep if var=="`var'"
		save `var'24.dta, replace
 
 		** 25 **
		use	eba_unodc_25.dta, clear
		keep if var=="`var'"
		save `var'25.dta, replace
 
 		** 26 **
		use	eba_unodc_26.dta, clear
		keep if var=="`var'"
		save `var'26.dta, replace
 
 		** 27 **
		use	eba_unodc_27.dta, clear
		keep if var=="`var'"
		save `var'27.dta, replace
 
 		** 28 **
		use	eba_unodc_28.dta, clear
		keep if var=="`var'"
		save `var'28.dta, replace
 
 		** 29 **
		use	eba_unodc_29.dta, clear
		keep if var=="`var'"
		save `var'29.dta, replace
 
 		** 30 **
		use	eba_unodc_30.dta, clear
		keep if var=="`var'"
		save `var'30.dta, replace		
		
		** 31 **
		use	eba_unodc_31.dta, clear
		keep if var=="`var'"
		save `var'31.dta, replace
 
 		** 32 **
		use	eba_unodc_32.dta, clear
		keep if var=="`var'"
		save `var'32.dta, replace
 
 		** 33 **
		use	eba_unodc_33.dta, clear
		keep if var=="`var'"
		save `var'33.dta, replace
 
 		** 34 **
		use	eba_unodc_34.dta, clear
		keep if var=="`var'"
		save `var'34.dta, replace
 
 		** 35 **
		use	eba_unodc_35.dta, clear
		keep if var=="`var'"
		save `var'35.dta, replace
 
 		** 36 **
		use	eba_unodc_36.dta, clear
		keep if var=="`var'"
		save `var'36.dta, replace
 
 		** 37 **
		use	eba_unodc_37.dta, clear
		keep if var=="`var'"
		save `var'37.dta, replace
 
 		** 38 **
		use	eba_unodc_38.dta, clear
		keep if var=="`var'"
		save `var'38.dta, replace
 
 		** 39 **
		use	eba_unodc_39.dta, clear
		keep if var=="`var'"
		save `var'39.dta, replace
 
 		** 40 **
		use	eba_unodc_40.dta, clear
		keep if var=="`var'"
		save `var'40.dta, replace		
		
		** 41 **
		use	eba_unodc_41.dta, clear
		keep if var=="`var'"
		save `var'41.dta, replace
 
 		** 42 **
		use	eba_unodc_42.dta, clear
		keep if var=="`var'"
		save `var'42.dta, replace
 
 		** 43 **
		use	eba_unodc_43.dta, clear
		keep if var=="`var'"
		save `var'43.dta, replace
 
 		** 44 **
		use	eba_unodc_44.dta, clear
		keep if var=="`var'"
		save `var'44.dta, replace
 
 		** 45 **
		use	eba_unodc_45.dta, clear
		keep if var=="`var'"
		save `var'45.dta, replace
 
 		** 46 **
		use	eba_unodc_46.dta, clear
		keep if var=="`var'"
		save `var'46.dta, replace
 
 		** 47 **
		use	eba_unodc_47.dta, clear
		keep if var=="`var'"
		save `var'47.dta, replace
 
 		** 48 **
		use	eba_unodc_48.dta, clear
		keep if var=="`var'"
		save `var'48.dta, replace
 
 		** 49 **
		use	eba_unodc_49.dta, clear
		keep if var=="`var'"
		save `var'49.dta, replace
 
 		** 50 **
		use	eba_unodc_50.dta, clear
		keep if var=="`var'"
		save `var'50.dta, replace
		
		** 51 **
		use	eba_unodc_51.dta, clear
		keep if var=="`var'"
		save `var'51.dta, replace
 
 		** 52 **
		use	eba_unodc_52.dta, clear
		keep if var=="`var'"
		save `var'52.dta, replace
 
 		** 53 **
		use	eba_unodc_53.dta, clear
		keep if var=="`var'"
		save `var'53.dta, replace
 
 		** 54 **
		use	eba_unodc_54.dta, clear
		keep if var=="`var'"
		save `var'54.dta, replace
 
 		** 55 **
		use	eba_unodc_55.dta, clear
		keep if var=="`var'"
		save `var'55.dta, replace
 
 		** 56 **
		use	eba_unodc_56.dta, clear
		keep if var=="`var'"
		save `var'56.dta, replace
 
 		** 57 **
		use	eba_unodc_57.dta, clear
		keep if var=="`var'"
		save `var'57.dta, replace
 
 		** 58 **
		use	eba_unodc_58.dta, clear
		keep if var=="`var'"
		save `var'58.dta, replace
 
 		
 	 
		use	`var'1.dta, clear		
		append using `var'2.dta
		append using `var'3.dta		
		append using `var'4.dta		
		append using `var'5.dta		
		append using `var'6.dta		
		append using `var'7.dta		
		append using `var'8.dta		
		append using `var'9.dta		
		append using `var'10.dta		
 		append using `var'11.dta	
		append using `var'12.dta
		append using `var'13.dta		
		append using `var'14.dta		
		append using `var'15.dta		
		append using `var'16.dta		
		append using `var'17.dta		
		append using `var'18.dta		
		append using `var'19.dta		
		append using `var'20.dta				
 		append using `var'21.dta	
		append using `var'22.dta
		append using `var'23.dta		
		append using `var'24.dta		
		append using `var'25.dta		
		append using `var'26.dta		
		append using `var'27.dta		
		append using `var'28.dta		
		append using `var'29.dta		
		append using `var'30.dta			
 		append using `var'31.dta	
		append using `var'32.dta
		append using `var'33.dta		
		append using `var'34.dta		
		append using `var'35.dta		
		append using `var'36.dta		
		append using `var'37.dta		
		append using `var'38.dta		
		append using `var'39.dta		
		append using `var'40.dta		
 		append using `var'41.dta	
		append using `var'42.dta
		append using `var'43.dta		
		append using `var'44.dta		
		append using `var'45.dta		
		append using `var'46.dta		
		append using `var'47.dta		
		append using `var'48.dta, force		
		append using `var'49.dta, force		
		append using `var'50.dta, force		
 		append using `var'51.dta, force	
		append using `var'52.dta, force
		append using `var'53.dta, force		
		append using `var'54.dta, force		
		append using `var'55.dta, force		
		append using `var'56.dta, force		
		append using `var'57.dta, force		
		append using `var'58.dta, force		
	
		save eba_unodc_gdp.dta, replace

		erase `var'1.dta		
		erase `var'2.dta
		erase `var'3.dta		
		erase `var'4.dta		
		erase `var'5.dta		
		erase `var'6.dta		
		erase `var'7.dta		
		erase `var'8.dta		
		erase `var'9.dta		
		erase `var'10.dta		
		erase `var'11.dta	
		erase `var'12.dta
		erase `var'13.dta		
		erase `var'14.dta		
		erase `var'15.dta		
		erase `var'16.dta		
		erase `var'17.dta		
		erase `var'18.dta		
		erase `var'19.dta		
		erase `var'20.dta				
		erase `var'21.dta	
		erase `var'22.dta
		erase `var'23.dta		
		erase `var'24.dta		
		erase `var'25.dta		
		erase `var'26.dta		
		erase `var'27.dta		
		erase `var'28.dta		
		erase `var'29.dta		
		erase `var'30.dta			
		erase `var'31.dta	
		erase `var'32.dta
		erase `var'33.dta		
		erase `var'34.dta		
		erase `var'35.dta		
		erase `var'36.dta		
		erase `var'37.dta		
		erase `var'38.dta		
		erase `var'39.dta		
		erase `var'40.dta		
		erase `var'41.dta	
		erase `var'42.dta
		erase `var'43.dta		
		erase `var'44.dta		
		erase `var'45.dta		
		erase `var'46.dta		
		erase `var'47.dta		
		erase `var'48.dta		
		erase `var'49.dta		
		erase `var'50.dta		
		erase `var'51.dta	
		erase `var'52.dta
		erase `var'53.dta		
		erase `var'54.dta		
		erase `var'55.dta		
		erase `var'56.dta		
		erase `var'57.dta		
		erase `var'58.dta		
		
		** 1.1. regressions calculated
		codebook _id
		** 1.3. beta mean & se   **
		sum coef if var=="dest_UNODC:gdpave"
		** 1.4.  %(significant != 0)  **
 		count if var=="dest_UNODC:gdpave" & pval<=.05 & pval~=.
		** 1.5 CDF **	
		sort coef
		cumul coef if var=="dest_UNODC:gdpave", gen(cdf) equal
		browse coef cdf  if cdf~=.	/* Take the cdf of the last value where coef<0 */
 		
		
